from sklearn import datasets
from pandas import DataFrame
import pandas as pd

x_data=datasets.load_iris().data
y_data=datasets.load_iris().target

print(x_data)
print(dir(x_data))
print(type(x_data))
print(x_data.shape)
print(y_data.shape)

x_data=DataFrame(x_data,columns=['花萼长','花萼宽','花瓣长','花瓣宽'])
pd.set_option('display.unicode.east_asian_width',True)
# print(x_data)
# print(type(x_data))
x_data['类别']=y_data
print(x_data)